<#import "/common/function.ftl" as fn>
<@fn.header _title="发送信息核实">
<script language="javascript" type="text/javascript" src="${base}/web/js/jquery.form.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() { 
    var options = {
        beforeSubmit:validate,
        success:showResponse,
        dataType:'json'
    }; 
    
    $('#mainForm').submit(function() {
        $(this).ajaxSubmit(options);
        return false;
    });
}); 

function validate(formData, jqForm, options) {
    for (var i=0; i < formData.length; i++) { 
        if (!formData[i].value) { 
            alert('请将表单信息填写完整！'); 
            return false; 
        }
    }
    return true; 
}

function showResponse(responseText, statusText, xhr, $form)  {
//	alert("showResponse");
    if(responseText['status'] == "1"){
    	alert("保存成功！请处理其他申请！");
    	redirect();
    }else{
    	alert("数据保存失败！");
    }
}

function redirect(){
//	parent.selectTab(2);
//	window.location.href="${base}/infoverify/index";
	window.location.href="${base}/infoInput/index";
}
</script>
</@fn.header>
<body>
<form action="${base}/infoInput/sendCheck" id="mainForm" method="post">
    <div class="rightBk">
    	<@fn.position _value="信息录入 &gt;&gt; 发送信息核实" />
        <!-- 选项卡 -->
        <div style="margin:0px 0;height:30px">
        <ul class="tab">
	    	<li><a href="${base}/infoInput/familyBasicInfo/${checkTotalId}/${taskId?c}/${result}">核对家庭基本信息</a></li>
	    	<li><a href="${base}/infoInput/familyMemberInfo/${checkTotalId}/${taskId?c}/${result}">核对家庭成员基本信息</a></li>
	    	<li><a href="${base}/infoInput/familyMemberIncome/${checkTotalId}/${taskId?c}/${result}">家庭成员可支配收入</a></li>
	   	 	<li><a href="${base}/infoInput/familyMemberProperty/${checkTotalId}/${taskId?c}/${result}">家庭成员财产</a></li>
	    	<li class="visited"><a href="${base}/infoInput/sendCheck/${checkTotalId}/${taskId?c}/${result}">发送信息核实</a></li>            
        </ul>
        </div>
         <!-- title -->        
        <div class="title">
            <div class="title-middle">
                <div class="title-left"></div>
                <div class="title-caption">业务审核记录</div>
                <div class="title-right"></div>
            </div>
        </div>
        
        <!-- table -->
        <table class="tableCenter">
            <tr>
                <th width="5%">序号</th>
                <th width="8%">申请人代表</th>
                <th width="10%">审核节点</th>
                <th width="8%">审核结果</th>
                <th width="12%">经办人</th>
                <th width="28%">审核意见</th>
            </tr>
            <tr>
                <td>${(id)!}</td>
                <td>${(mainApply.name)!!}</td>
                <td>信息录入</td>
                <td>通过</td>
                <td>${(username)!}</td>
                <td>申请材料完整有效，予以受理</td>
            </tr>
        </table>
        <br />
        <!-- title -->        
        <div class="title marginTop15">
            <div class="title-middle">
                <div class="title-left"></div>
                <div class="title-caption">核对家庭成员信息概要</div>
                <div class="title-right"></div>
            </div>
        </div>
        
        <!-- table -->
        <table class="tableCenter">
            <tr>
                <th width="5%">序号</th>
                <th width="8%">姓名</th>
                <th width="30%">证件号</th>
                <th width="15%">与申请人代表关系</th>
                <th width="12%">可支配收入申报</th>
                <th width="8%">财产申报</th>
            </tr>
            <#list familyMembers as fm>
                    <tr>
                        <td>
                            ${fm_index+1}
                        </td>
                        <td>
                            <a href="#" onclick="showPerson('${fm.id}');">
                                ${fm.name}
                            </a>
                        </td>
                        <td>
                            ${fm.idNumber}
                        </td>
                        <td>
                            ${fm.relationMainApplicant}
                        </td>
                        <td>
                        <#if (fm.isReportDPI==true)>
                            已填写
                        <#else>
                            未填写
                        </#if>
                        </td>
                        <td>
                        <#if (fm.isReportProperty==true)>
                            已填写
                        <#else>
                            未填写
                        </#if>
                        </td>
                    </tr>
                </#list>
        </table>
		<br />
        <!-- title -->
        <div class="title marginTop15">
            <div class="title-middle">
                <div class="title-left"></div>
                <div class="title-caption">发送信息核实</div>
                <div class="title-right"></div>
            </div>
        </div>
        
        <!-- table -->
        <table class="table2">
            <tr>
                <td>
                    <input id="Radio1" checked="checked" name="verifyReason" type="radio" value="ACCEPT_ENTRUST" />受理委托
                    <input id="Radio2" name="verifyReason" type="radio" value="NEED_MORE_INFO"/>补证材料</td>
            </tr>
            <tr>
                <td>
                    <input type="text" name="" class="input7" value="申报信息完整，发送街镇核实"/>
                </td>
            </tr>
        </table>
        <input type="hidden" name="taskId" value="${taskId?c}" />
        <input type="hidden" name="checkTotalId" value="${checkTotalId}" />
        <!-- button -->
		<div class="alignCenter marginTop15"><input type="image" src="${base}/web/img/btnSave.gif" /></div>
	</div>
</form>
</body>
</html>